package com.island.service.provider;

import com.island.mapper.provider.ProviderMapper;
import com.island.pojo.Provider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
public class ProviderServiceImpl implements ProviderService{

    @Autowired
    private ProviderMapper providerMapper;

    public List<Provider> queryProviderList(Map map) {
        return providerMapper.queryProviderList(map);
    }

    public int addProvider(Provider provider) {
        return providerMapper.addProvider(provider);
    }

    public int updateProvider(Provider provider) {
        return providerMapper.updateProvider(provider);
    }

    public Provider queryProviderById(int id) {
        return providerMapper.queryProviderById(id);
    }

    public int getProviderCount(String proCode, String proName) {
        return providerMapper.getProviderCount(proCode,proName);
    }

    public int deleteProvider(int id) {
        return providerMapper.deleteProvider(id);
    }
}
